﻿Imports System.ComponentModel

Namespace Controls
    ''' <summary> 
    ''' 边框风格转换器 
    ''' </summary> 
    Public Class BorderStyleConverter
        Inherits StringConverter
        ''' <summary> 
        ''' 构造函数 
        ''' </summary> 
        Public Sub New()
        End Sub

        ''' <summary> 
        ''' 获取标准值列表支持 
        ''' </summary> 
        ''' <param name="context"></param> 
        ''' <returns></returns> 
        Public Overloads Overrides Function GetStandardValuesSupported(ByVal context As ITypeDescriptorContext) As Boolean
            Return True
        End Function

        Public Overloads Overrides Function GetStandardValuesExclusive(ByVal context As ITypeDescriptorContext) As Boolean
            Return False
        End Function

        ''' <summary> 
        ''' 获取标准值列表 
        ''' </summary> 
        ''' <param name="context"></param> 
        ''' <returns></returns> 
        Public Overloads Overrides Function GetStandardValues(ByVal context As ITypeDescriptorContext) As System.ComponentModel.TypeConverter.StandardValuesCollection
            Return New StandardValuesCollection(New String() {"none", "dotted", "dashed", "solid", "double", "groove", _
            "ridge", "inset", "window-inset", "outset"})
        End Function
    End Class
End Namespace